import { GetServerSideProps, NextPage, PageConfig } from 'next';
import Head from 'next/head';
import Content from './content';

interface IProps {
	aid: string;
	type: string
}

/**
 * 报名者-我的活动
 */
const Page: NextPage<IProps> = ({ aid, type }) => {
	return (
		<>
			<Head>
				<title>我的活动</title>
			</Head>
			<Content aid={aid} type={type} />
		</>
	);
};

export const config: PageConfig = {
	amp: false
};

export default Page;

export const getServerSideProps: GetServerSideProps<IProps> = async (context) => {
	const query = context.query as Record<string, string>;
	return {
		props: {
			aid: query.aid || '',
			type: query.type || ''
		}
	};
};
